
public class p1001_94ms {

	public static//
	// -----
	// -----
	class Main {
		public static void main(String[] args) throws Exception {
			java.io.BufferedReader reader = new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
			String line;
			while ((line = reader.readLine()) != null) {
				java.math.BigDecimal x = new java.math.BigDecimal(line.substring(0, 6)).pow(
						Integer.parseInt(line.substring(7).trim())).stripTrailingZeros();
				String s = x.toPlainString();
				if (s.startsWith("0"))
					s = s.substring(1);
				System.out.println(s);
			}
		}
	}

	// -----
	// -----

	public static void main(String[] args) throws Exception {
		Judge.run();
	}

}
